package com.zan.tomcatqpstest.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Zan
 * @Create 2024/8/30 16:06
 * @ClassName: QpsTestController
 * @Description : TODO 请用一句话描述该类的功能
 */
@RestController
public class QpsTestController {

    /**
     *
     * @return
     */
    @GetMapping("/test")
    public String qpsTest() {
        // 处理，操作数据库，操作redis.... 假设50ms
        return "ok";
    }

    @GetMapping("/test2")
    public String qpsTest2() {
        // 处理，操作数据库，操作redis.... 假设50ms
        try {
            Thread.sleep(50L);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return "ok";
    }
}
